package com.example.jussi.activityforstaticbroadcastdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

/**
 * 跨应用程序发送广播
 * 广播在 StaticBroadCast 里注册
 */
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void start(View hhView){
        Intent intent = new Intent();
        intent.setAction("com.jussi");
        sendBroadcast(intent);
    }
}
